package hn.cch.spring.aop;

import org.springframework.aop.Advisor;
import org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator;
import org.springframework.lang.NonNull;

import java.util.List;

/**
 * AnnotationAwareAspectJAutoProxyCreator中的方法都是protected修饰的
 */
public class MyAutoProxyCreator extends AnnotationAwareAspectJAutoProxyCreator {

    @NonNull
    @Override
    protected List<Advisor> findEligibleAdvisors(@NonNull Class<?> beanClass, @NonNull String beanName) {
        return super.findEligibleAdvisors(beanClass, beanName);
    }

    @NonNull
    @Override
    protected Object wrapIfNecessary( @NonNull Object bean,  @NonNull String beanName,  @NonNull Object cacheKey) {
        return super.wrapIfNecessary(bean, beanName, cacheKey);
    }
}
